using UnityEngine;
using UnityEngine.Rendering.Universal;

public class StencilVisualizerFeature : ScriptableRendererFeature
{
    [SerializeField]
    private Material stencilVisualizerMaterial;

    private StencilVisualizerPass pass;

    public override void Create()
    {
        pass = new StencilVisualizerPass(stencilVisualizerMaterial)
        {
            renderPassEvent = RenderPassEvent.AfterRenderingTransparents
        };
    }

    public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
    {
        renderer.EnqueuePass(pass);
    }
}
